<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="assetMenu" />
<meta name="nav" content="1" />
<meta name="acc" content="2" />
<title>公告管理</title>
<script>
	$(document).ready(function() {
		$("#createDateBeg").addClass("Wate").bind("click", function() {
			WdatePicker({
				skin : 'whyGreen',
				minDate : '1900-10-01',
				maxDate:'#F{$dp.$D(\'createDateEnd\')}',
				dateFmt : 'yyyy-MM-dd'
			});
		});
			$("#createDateEnd").addClass("Wate").bind("click", function() {
				WdatePicker({
					skin : 'whyGreen',
					minDate:'#F{$dp.$D(\'createDateBeg\')}',
					dateFmt : 'yyyy-MM-dd'
				});	
		});
	});
</script>
</head>
<body>
<div id="heading" class="publish"><h6>公告列表</h6></div>
<div id="message"><s:actionmessage theme="custom"
	cssClass="success" /></div>
<form id="mainForm" action="${ctx }/asset/message/publish.action" method="get" class="yform">
<div id="filter">
<ul>
<li>发布单位
		<pt:labels type="insideOrgDept" name="filter_LIKES_department.id"
			prompt="全部" default="${param['filter_LIKES_department.id']}">
		</pt:labels>
</li>
<li>发布日期:<input id="createDateBeg" type="text" name="filter_GED_createDate" value="${param['filter_GED_createDate']}" /></li>
<li>到:<input id="createDateEnd" type="text" name="filter_LED_createDate" value="${param['filter_LED_createDate'] }"/></li>		
<li>重要程度:<pt:code prompt="全部" category="2025" name="filter_LIKES_importance" default="${param['filter_LIKES_importance']}"></pt:code></li>
</ul>
<div class="type-button"><input type="button" onclick="search();" class="search" value="查询"/></div>
 </div>
<div id="content">
<table id="contentTable">
	<tr>
		<th><a id="createDate" href="javascript:sort('createDate','asc')">序号</a></th>
		<th><a id="department.depName" href="javascript:sort('department.depName','asc')">发布单位</a></th>
		<th><a id="importance" href="javascript:sort('importance','asc')">重要程度</a></th>
		<th><a id="title" href="javascript:sort('title','asc')">标题</a></th>
		<th><a id="createDate" href="javascript:sort('createDate','asc')">发布日期</a></th>
		<th>操作</th>
	</tr>
	<c:forEach items="${page.result}" var="publish" varStatus="status">
		<tr>
			<td>${page.first+status.index }</td>
			<td>${publish.department.depName}</td>
			<td>  <pt:code category="2025" code="${publish.importance}"></pt:code>	</td>
			<td><pt:text limit="15">${publish.title}</pt:text></td>
			<td><fmt:formatDate value="${publish.createDate}" pattern="yyyy-MM-dd HH:mm"/></td>
			<td><a
				href="${ctx}/asset/message/publish!input.action?id=${publish.id}">编辑</a>
			<a href="${ctx}/asset/message/publish!delete.action?id=${publish.id}" onclick="return confirmDelete();">删除</a>
			<a href="${ctx}/asset/message/publish!view.action?id=${publish.id}">查看</a>
			</td>
		</tr>
	</c:forEach>
</table>
</div>
<jsp:include page="/common/page.jsp" />
<div class="type-button"><input onclick="location.href='${ctx}/asset/message/publish!input.action'" type="button" class="submit" value="新增" />
</div>
</form>
</body>
</html>
